<div class="col-sm-12">
  <div class="box  ">
    <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
      <div class="row">
        <div  class="col-sm-9 nopadding-left">
          <div class="col-sm-5">
              <div class="input-group">
                  {{input class="form-control" type="text" placeholder="搜索姓名" value=queryStayBack enter="searchStaff"}}
                  <span class="input-group-btn">
                    <button class="btn btn-primary btn-reduce" type="button" style="touch-action: manipulation; -ms-touch-action: manipulation;" {{action "searchStaff" on="click"}}>
                      <i class="fa fa-search"></i>
                    </button>
                  </span>
              </div>
          </div>
          <div class="col-sm-3 nopadding-left nopadding-right pull-right" style="line-height:30px;font-size:13px;">
              <i class="pointer {{if queryScheduled 'fa-dot-circle-o' 'fa-circle-o'}}" {{action 'queryScheduled' on='click'}}><span>申请退住</span></i>
              <i class="pointer {{if queryAll 'fa-dot-circle-o' 'fa-circle-o'}}" {{action 'queryAll' on='click'}}><span>全部</span></i>
          </div>
        </div>
        <div class="col-sm-3 user-add-btn">
          {{#ui/mix-button class="user-btn pull-right" iconClass="fa-plus" text='新增退住登记' clickAction="toStayBackDetail" toStayBackDetail="toStayBackDetail" }}
          {{/ui/mix-button}}
        </div>
      </div>

      <table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-bordered table-hover dataTable" aria-describedby="datatable1_info">
          <thead>
              <tr role="row">
                  <th rowspan="1" colspan="1">姓名</th>
                  <th rowspan="1" colspan="1" width="">身份证号</th>
                  <th rowspan="1" colspan="1" width="">床位号</th>
                  <th rowspan="1" colspan="1" width="">申请状态</th>
                  <th rowspan="1" colspan="1" width="">申请退住日期</th>
                  <th rowspan="1" colspan="1" width="">实际退住日期</th>
                  <th rowspan="1" colspan="1" width="">账单状态</th>
                  <th class="center" rowspan="1" colspan="1" width="">操作</th>
              </tr>
          </thead>
          {{#if customerflowList}}
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
                  {{#each customerflowList as |customer|}}
                      <tr>
                          <td class="ellipsis" {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.customer.name}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.customer.cardCode}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.customer.bed.allBedName}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.customerstatus}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.leaveDateString}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.leaveDateRealTimeString}}</td>
                          <td class="ellipsis " {{action "toStayBackDetail" customer.id customer.customer.id on="click"}}>{{customer.billStatusName}}</td>
                          <td class="ellipsis center">
                            {{#if customer.couldBack}}
                              <a class=""  {{action "completeFlow" customer  on="click"}}>完成退住</a>
                            {{/if}}
                            {{#if (eq customer.leaveStatusTypecodNumber 1)}}
                            {{else}}
                            <a class="" {{action "chengeState" customer on="click"}}>{{customer.customerStatusClick}}</a>
                              {{#if (eq customer.leaveStatusTypecodNumber 2)}}
                              {{else if (eq customer.leaveStatusTypecodNumber 3)}}
                              {{else}}
                                {{#unless customer.couldBack}}
                                  <a class=""  {{action "theToVoid" customer  on="click"}}>作废</a>
                                {{/unless}}
                              {{/if}}
                            {{/if}}

                          </td>
                      </tr>
                  {{/each}}
          </tbody>
          {{else}}
          {{/if}}
      </table>

    {{#if customerflowList}}
        {{page-numbers content=customerflowList showFL=true numPagesToShow=5}}
    {{/if}}
    </div>
  </div>
</div>
